home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / PredatorPrey / Miscellany.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  1.3 KB  |  56 lines  |  [TEXT/KAHL]

  1. /* Miscellany.h */
  2.  
  3. #ifndef __MIS__
  4. #define __MIS__
  5.  
  6. #include <Packages.h>
  7.  
  8. extern Boolean        errorFlag;
  9.  
  10. /*----------*/
  11. void    MiscellanySeg    (void);
  12. void    Acknowledge        (short            alertID);
  13. Boolean    Confirm            (short            alertID);
  14.  
  15. Boolean    CheckOS            (OSErr            resultCode);
  16. void    FailNilResource    (Handle            resource);
  17. Boolean    FileExists        (Str255            fName,
  18.                          short            vRefNum);
  19. Boolean    CreateFile        (SFReply        *sfInfo,
  20.                          Str255            prompt,
  21.                          Str255            suggestion,
  22.                          OSType            creator,
  23.                          OSType            fileType);
  24.  
  25. void    ScaleWindow        (WindowPtr        window,
  26.                          Boolean        scaleSize);
  27.  
  28. void    DrawClippedGrow (short            x,
  29.                          short            y);
  30.  
  31. void    DoRadioMenu        (MenuHandle        menu,
  32.                          short            firstItem,
  33.                          short            lastItem,
  34.                          short            itemNr);
  35.  
  36. void    PlaySound        (MenuHandle        soundsMenu,
  37.                          short            itemNr);
  38.  
  39. /*----------*/
  40. /* The following routines implement a linked list of Items.*/
  41. /* These routines expect that the first field of every item*/
  42. /* is a pointer (Handle) to the next item. They make no*/
  43. /* assumptions about the remainder of each item.*/
  44.  
  45. typedef struct LinkedItemRec {
  46.     struct LinkedItemRec    **next;
  47. } LinkedItemRec, *LinkedItemPtr, **LinkedItem;
  48.  
  49. void    LinkLast        (Handle            *listHead,
  50.                          Handle            newItem);
  51. Handle    GetNth            (Handle            listHead,
  52.                          short            num);
  53. Handle    UnlinkNth        (Handle            *listHead,
  54.                          short            num);
  55.  
  56. #endif    /*    __MIS__    */